<!--
  Generated template for the StoreSelPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>库存档案</ion-title>
    <ion-buttons end> 
      <!--tap 点击事件和click类似-->
        <button ion-button icon-only (tap)="dismiss()">
            <ion-icon name='close'></ion-icon>
          </button>
    </ion-buttons>
  </ion-navbar>

</ion-header>

<ion-content>
    <!-- 下拉刷新块 -->
    <ion-refresher (ionRefresh)="doRefresh($event)"> 
          <ion-refresher-content>  
          </ion-refresher-content>
    </ion-refresher>
  
       <ion-searchbar [(ngModel)]="searchValue" (ionInput)="getItems($event)" placeholder="搜索库存产品"></ion-searchbar>
       <ion-list>
          <ion-item *ngFor="let item of items" (tap)="select(item)">
            <!--tem Thumbnail显示了一个占据项高度的图片。在项内添加ion-thumbnail组件来使用-->
            <ion-thumbnail item-start>
              <img src="/assets/imgs/product_list_default.png">
            </ion-thumbnail>
            <h2>{{item.sp_store__sp_name}}</h2>
            <p>{{item.sp_store__sp_type}}</p>
            <p>库存数量：{{item.sp_store__store_num |number:0}}</p>
          </ion-item>
        </ion-list>
  
        <!-- 上拉加载块 -->
        <!--滚动-->
        <ion-infinite-scroll (ionInfinite)="doInfinite($event)" immediate-check="false">
            <ion-infinite-scroll-content></ion-infinite-scroll-content>
        </ion-infinite-scroll>
    
  </ion-content>